﻿using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;


namespace DexComanda
{
    public class Mysql
    {
        private static readonly Mysql instancia = new Mysql();
        private static MySqlConnection conexao;



        public static Mysql getInstancia()
        {
            return instancia;
        }

        public MySqlConnection getConnection()
        {


            string conn = ConfigurationManager.ConnectionStrings["ADM.MysqlConnection"].ToString();//"server=localhost;database=prosystem;uid='root';pwd='1001';Allow Zero Datetime=True"; 


            conexao = new MySqlConnection(conn);
            return conexao;
        }

    }
}
